home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1990-04-16 | 2.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Apr 16 10:59:04 1990, modified Mon Apr 16 10:59:04 1990, creator Think C, type ASCII, 2190 bytes "DialogUtils.c" , at 0x90e 286 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 44 69 61 6c 6f 67 | 55 74 69 6c 73 2e 63 00 |..Dialog|Utils.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 40 00 40 00 |.TEXTKAH|L...@.@.|
|00000050| 00 00 00 00 00 08 8e 00 | 00 01 1e a2 4f 8e 38 a2 |........|....O.8.|
|00000060| 4f 8e 38 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |O.8.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c4 52 00 00 |........|.....R..|
|00000080| 2f 2a 0d 66 72 6f 6d 20 | 65 6e 67 62 65 72 40 67 |/*.from |engber@g|
|00000090| 75 6d 62 61 6c 6c 2e 69 | 6c 73 2e 6e 77 75 2e 65 |umball.i|ls.nwu.e|
|000000a0| 64 75 20 28 4d 69 6b 65 | 20 45 6e 67 62 65 72 29 |du (Mike| Engber)|
|000000b0| 3a 0d 0d 54 68 61 6e 6b | 73 20 66 6f 72 20 61 6c |:..Thank|s for al|
|000000c0| 6c 20 74 68 65 20 72 65 | 70 6c 79 73 20 74 6f 20 |l the re|plys to |
|000000d0| 6d 79 20 63 65 6e 74 65 | 72 69 6e 67 20 44 4c 4f |my cente|ring DLO|
|000000e0| 47 2f 41 4c 52 54 20 71 | 75 65 73 74 69 6f 6e 2e |G/ALRT q|uestion.|
|000000f0| 20 49 20 75 73 65 64 20 | 74 68 65 0d 62 65 73 74 | I used |the.best|
|00000100| 20 69 64 65 61 73 20 74 | 6f 20 73 79 6e 74 68 65 | ideas t|o synthe|
|00000110| 73 69 7a 65 20 6d 79 20 | 73 6f 6c 75 74 69 6f 6e |size my |solution|
|00000120| 20 77 68 69 63 68 20 49 | 20 74 68 69 6e 6b 20 65 | which I| think e|
|00000130| 6c 65 67 61 6e 74 20 65 | 6e 6f 75 67 68 20 74 6f |legant e|nough to|
|00000140| 20 62 65 0d 77 6f 72 74 | 68 20 73 68 61 72 69 6e | be.wort|h sharin|
|00000150| 67 2e 20 41 74 74 61 63 | 68 65 64 20 61 72 65 20 |g. Attac|hed are |
|00000160| 74 68 65 20 72 65 6c 65 | 76 61 6e 74 20 70 6f 72 |the rele|vant por|
|00000170| 74 69 6f 6e 73 20 6f 66 | 20 6d 79 20 2e 68 20 26 |tions of| my .h &|
|00000180| 20 2e 63 20 66 69 6c 65 | 73 2e 0d 0d 41 20 63 6f | .c file|s...A co|
|00000190| 75 70 6c 65 20 6f 66 20 | 6e 6f 74 65 73 3a 0d 0d |uple of |notes:..|
|000001a0| 53 65 76 65 72 61 6c 20 | 70 65 6f 70 6c 65 60 73 |Several |people`s|
|000001b0| 20 73 6f 6c 75 74 69 6f | 6e 73 20 62 75 72 6e 65 | solutio|ns burne|
|000001c0| 64 20 69 6e 20 74 68 65 | 20 72 73 72 63 20 69 64 |d in the| rsrc id|
|000001d0| 73 20 6f 66 20 74 68 65 | 20 73 74 61 6e 64 61 72 |s of the| standar|
|000001e0| 64 0d 66 69 6c 65 20 64 | 69 61 6c 6f 67 73 2e 20 |d.file d|ialogs. |
|000001f0| 59 6f 75 20 6d 61 79 20 | 77 61 6e 74 20 74 6f 20 |You may |want to |
|00000200| 6e 6f 74 65 20 74 68 61 | 74 20 74 68 65 72 65 20 |note tha|t there |
|00000210| 61 72 65 20 6e 61 6d 65 | 64 20 63 6f 6e 73 74 61 |are name|d consta|
|00000220| 6e 74 73 20 66 6f 72 0d | 74 68 65 73 65 20 76 61 |nts for.|these va|
|00000230| 6c 75 65 73 3a 20 70 75 | 74 44 6c 67 49 44 20 20 |lues: pu|tDlgID |
|00000240| 26 20 67 65 74 44 6c 67 | 49 44 2e 0d 0d 41 6c 6c |& getDlg|ID...All|
|00000250| 20 74 68 65 20 73 6f 6c | 75 74 69 6f 6e 73 20 49 | the sol|utions I|
|00000260| 20 77 61 73 20 73 65 6e | 74 20 75 73 65 64 20 73 | was sen|t used s|
|00000270| 63 72 65 65 6e 42 69 74 | 73 2e 62 6f 75 6e 64 73 |creenBit|s.bounds|
|00000280| 2e 20 49 73 20 74 68 69 | 73 20 77 68 61 74 20 79 |. Is thi|s what y|
|00000290| 6f 75 0d 77 61 6e 74 20 | 69 6e 20 61 20 6d 75 6c |ou.want |in a mul|
|000002a0| 74 69 2d 6d 6f 6e 69 74 | 6f 72 20 73 69 74 75 61 |ti-monit|or situa|
|000002b0| 74 69 6f 6e 3f 20 49 66 | 20 6e 6f 74 2c 20 77 68 |tion? If| not, wh|
|000002c0| 61 74 20 73 68 6f 75 6c | 64 20 79 6f 75 20 64 6f |at shoul|d you do|
|000002d0| 3f 0d 0d 46 65 65 6c 20 | 66 72 65 65 20 74 6f 20 |?..Feel |free to |
|000002e0| 75 73 65 2f 6d 6f 64 69 | 66 79 2f 63 6f 6d 6d 65 |use/modi|fy/comme|
|000002f0| 6e 74 2d 6f 6e 20 74 68 | 69 73 20 63 6f 64 65 2c |nt-on th|is code,|
|00000300| 20 65 73 70 65 63 69 61 | 6c 6c 79 20 69 66 20 79 | especia|lly if y|
|00000310| 6f 75 20 6e 6f 74 69 63 | 65 0d 61 6e 79 20 62 75 |ou notic|e.any bu|
|00000320| 67 73 20 6f 72 20 71 75 | 65 73 74 69 6f 6e 61 62 |gs or qu|estionab|
|00000330| 6c 65 20 70 72 61 63 74 | 69 63 65 73 2e 0d 0d 2d |le pract|ices...-|
|00000340| 4d 45 0d 2a 2f 0d 0d 2f | 2a 20 2d 2d 2d 2d 2d 20 |ME.*/../|* ----- |
|00000350| 2d 2d 2d 2d 2d 20 2d 2d | 2d 2d 2d 20 2d 2d 2d 2d |----- --|--- ----|
|00000360| 2d 20 2d 2d 2d 2d 2d 20 | 2d 2d 2d 2d 2d 20 2d 2d |- ----- |----- --|
|00000370| 2d 2d 2d 20 2d 2d 2d 2d | 2d 20 2d 2d 2d 2d 2d 20 |--- ----|- ----- |
|00000380| 2d 2d 2d 2d 2d 20 2d 2d | 2d 2d 2d 20 2a 2f 0d 0d |----- --|--- */..|
|00000390| 0d 2f 2a 20 44 69 61 6c | 6f 67 55 74 69 6c 73 2e |./* Dial|ogUtils.|
|000003a0| 63 20 2a 2f 0d 20 0d 23 | 69 6e 63 6c 75 64 65 20 |c */. .#|include |
|000003b0| 22 44 69 61 6c 6f 67 55 | 74 69 6c 73 2e 68 22 0d |"DialogU|tils.h".|
|000003c0| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 44 55 5f |.static |void DU_|
|000003d0| 43 65 6e 74 65 72 52 65 | 63 74 28 52 65 63 74 2a |CenterRe|ct(Rect*|
|000003e0| 20 72 65 63 74 5f 70 29 | 7b 0d 2f 2a 0d 20 2a 20 | rect_p)|{./*. * |
|000003f0| 41 6c 69 67 6e 73 20 2a | 72 65 63 74 5f 70 20 77 |Aligns *|rect_p w|
|00000400| 72 74 20 73 63 72 65 65 | 6e 42 69 74 73 2e 62 6f |rt scree|nBits.bo|
|00000410| 75 6e 64 73 20 2d 20 4c | 52 20 63 65 6e 74 65 72 |unds - L|R center|
|00000420| 65 64 20 26 20 69 6e 20 | 75 70 70 65 72 20 31 2f |ed & in |upper 1/|
|00000430| 33 0d 20 2a 2f 0d 0d 20 | 20 20 20 2f 2a 20 65 78 |3. */.. | /* ex|
|00000440| 61 63 74 6c 79 20 63 65 | 6e 74 65 72 65 64 20 2a |actly ce|ntered *|
|00000450| 2f 0d 20 20 20 20 4f 66 | 66 73 65 74 52 65 63 74 |/. Of|fsetRect|
|00000460| 28 72 65 63 74 5f 70 2c | 0d 20 20 20 20 20 20 20 |(rect_p,|. |
|00000470| 20 20 20 20 20 28 73 63 | 72 65 65 6e 42 69 74 73 | (sc|reenBits|
|00000480| 2e 62 6f 75 6e 64 73 2e | 72 69 67 68 74 20 2b 20 |.bounds.|right + |
|00000490| 73 63 72 65 65 6e 42 69 | 74 73 2e 62 6f 75 6e 64 |screenBi|ts.bound|
|000004a0| 73 2e 6c 65 66 74 29 2f | 32 20 2d 0d 20 20 20 20 |s.left)/|2 -. |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 72 65 63 | | (rec|
|000004c0| 74 5f 70 2d 3e 72 69 67 | 68 74 20 2b 20 72 65 63 |t_p->rig|ht + rec|
|000004d0| 74 5f 70 2d 3e 6c 65 66 | 74 29 2f 32 0d 20 20 20 |t_p->lef|t)/2. |
|000004e0| 20 20 20 20 20 2c 0d 20 | 20 20 20 20 20 20 20 20 | ,. | |
|000004f0| 20 20 20 28 73 63 72 65 | 65 6e 42 69 74 73 2e 62 | (scre|enBits.b|
|00000500| 6f 75 6e 64 73 2e 74 6f | 70 20 2b 20 73 63 72 65 |ounds.to|p + scre|
|00000510| 65 6e 42 69 74 73 2e 62 | 6f 75 6e 64 73 2e 62 6f |enBits.b|ounds.bo|
|00000520| 74 74 6f 6d 29 2f 32 20 | 2d 0d 20 20 20 20 20 20 |ttom)/2 |-. |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 28 72 65 63 74 5f | | (rect_|
|00000540| 70 2d 3e 74 6f 70 20 2b | 20 72 65 63 74 5f 70 2d |p->top +| rect_p-|
|00000550| 3e 62 6f 74 74 6f 6d 29 | 2f 32 0d 20 20 20 20 20 |>bottom)|/2. |
|00000560| 20 20 20 29 3b 0d 20 20 | 20 20 0d 20 20 20 20 2f | );. | . /|
|00000570| 2a 20 75 70 20 61 20 62 | 69 74 20 2a 2f 0d 20 20 |* up a b|it */. |
|00000580| 20 20 4f 66 66 73 65 74 | 52 65 63 74 28 72 65 63 | Offset|Rect(rec|
|00000590| 74 5f 70 2c 30 2c 20 0d | 20 20 20 20 20 20 20 20 |t_p,0, .| |
|000005a0| 47 65 74 4d 42 61 72 48 | 65 69 67 68 74 28 29 20 |GetMBarH|eight() |
|000005b0| 2d 20 32 2a 28 72 65 63 | 74 5f 70 2d 3e 74 6f 70 |- 2*(rec|t_p->top|
|000005c0| 20 2d 20 73 63 72 65 65 | 6e 42 69 74 73 2e 62 6f | - scree|nBits.bo|
|000005d0| 75 6e 64 73 2e 74 6f 70 | 29 2f 33 29 3b 0d 7d 0d |unds.top|)/3);.}.|
|000005e0| 0d 73 74 61 74 69 63 20 | 50 6f 69 6e 74 20 44 55 |.static |Point DU|
|000005f0| 5f 57 68 65 72 65 28 73 | 68 6f 72 74 20 72 73 72 |_Where(s|hort rsr|
|00000600| 63 49 64 29 7b 0d 2f 2a | 0d 20 2a 20 52 65 74 75 |cId){./*|. * Retu|
|00000610| 72 6e 73 20 63 65 6e 74 | 65 72 69 6e 67 20 70 6f |rns cent|ering po|
|00000620| 69 6e 74 20 66 6f 72 20 | 74 68 65 20 74 6f 70 4c |int for |the topL|
|00000630| 65 66 74 20 63 6f 72 6e | 65 72 20 6f 66 20 61 20 |eft corn|er of a |
|00000640| 64 69 61 6c 6f 67 2e 0d | 20 2a 2f 0d 20 20 20 20 |dialog..| */. |
|00000650| 48 61 6e 64 6c 65 20 20 | 68 20 3d 20 47 65 74 52 |Handle |h = GetR|
|00000660| 65 73 6f 75 72 63 65 28 | 27 44 4c 4f 47 27 2c 72 |esource(|'DLOG',r|
|00000670| 73 72 63 49 64 29 3b 0d | 20 20 20 20 52 65 63 74 |srcId);.| Rect|
|00000680| 20 20 20 20 72 20 3d 20 | 7b 30 2c 30 2c 30 2c 30 | r = |{0,0,0,0|
|00000690| 7d 3b 0d 20 20 20 20 69 | 66 28 68 29 7b 0d 20 20 |};. i|f(h){. |
|000006a0| 20 20 20 20 20 20 72 20 | 3d 20 2a 28 28 52 65 63 | r |= *((Rec|
|000006b0| 74 2a 29 28 2a 68 29 29 | 3b 0d 20 20 20 20 20 20 |t*)(*h))|;. |
|000006c0| 20 20 44 55 5f 43 65 6e | 74 65 72 52 65 63 74 28 | DU_Cen|terRect(|
|000006d0| 26 72 29 3b 0d 20 20 20 | 20 20 20 20 20 52 65 6c |&r);. | Rel|
|000006e0| 65 61 73 65 52 65 73 6f | 75 72 63 65 28 68 29 3b |easeReso|urce(h);|
|000006f0| 0d 20 20 20 20 7d 0d 20 | 20 20 20 72 65 74 75 72 |. }. | retur|
|00000700| 6e 20 74 6f 70 4c 65 66 | 74 28 72 29 3b 0d 7d 0d |n topLef|t(r);.}.|
|00000710| 0d 50 6f 69 6e 74 20 44 | 55 5f 53 74 64 50 75 74 |.Point D|U_StdPut|
|00000720| 57 68 65 72 65 28 76 6f | 69 64 29 7b 0d 20 20 20 |Where(vo|id){. |
|00000730| 20 72 65 74 75 72 6e 20 | 44 55 5f 57 68 65 72 65 | return |DU_Where|
|00000740| 28 70 75 74 44 6c 67 49 | 44 29 3b 0d 7d 0d 0d 50 |(putDlgI|D);.}..P|
|00000750| 6f 69 6e 74 20 44 55 5f | 53 74 64 47 65 74 57 68 |oint DU_|StdGetWh|
|00000760| 65 72 65 28 76 6f 69 64 | 29 7b 0d 20 20 20 20 72 |ere(void|){. r|
|00000770| 65 74 75 72 6e 20 44 55 | 5f 57 68 65 72 65 28 67 |eturn DU|_Where(g|
|00000780| 65 74 44 6c 67 49 44 29 | 3b 0d 7d 0d 0d 73 74 61 |etDlgID)|;.}..sta|
|00000790| 74 69 63 20 73 68 6f 72 | 74 20 44 55 5f 43 65 6e |tic shor|t DU_Cen|
|000007a0| 74 65 72 28 52 65 73 54 | 79 70 65 20 74 79 70 65 |ter(ResT|ype type|
|000007b0| 2c 20 73 68 6f 72 74 20 | 72 73 72 63 49 64 29 7b |, short |rsrcId){|
|000007c0| 0d 2f 2a 0d 20 2a 20 52 | 65 61 64 73 20 69 6e 20 |./*. * R|eads in |
|000007d0| 61 6e 20 27 41 4c 52 54 | 27 20 6f 72 20 27 44 4c |an 'ALRT|' or 'DL|
|000007e0| 4f 47 27 20 72 73 72 63 | 20 74 65 6d 70 6c 61 74 |OG' rsrc| templat|
|000007f0| 65 20 26 20 63 65 6e 74 | 65 72 73 20 69 74 27 73 |e & cent|ers it's|
|00000800| 20 64 69 73 70 6c 61 79 | 20 52 65 63 74 2e 0d 20 | display| Rect.. |
|00000810| 2a 2f 0d 20 20 20 20 48 | 61 6e 64 6c 65 20 20 68 |*/. H|andle h|
|00000820| 20 3d 20 47 65 74 52 65 | 73 6f 75 72 63 65 28 74 | = GetRe|source(t|
|00000830| 79 70 65 2c 72 73 72 63 | 49 64 29 3b 0d 20 20 20 |ype,rsrc|Id);. |
|00000840| 20 69 66 28 68 29 20 44 | 55 5f 43 65 6e 74 65 72 | if(h) D|U_Center|
|00000850| 52 65 63 74 28 28 52 65 | 63 74 2a 29 28 2a 68 29 |Rect((Re|ct*)(*h)|
|00000860| 29 3b 0d 20 20 20 20 72 | 65 74 75 72 6e 20 72 73 |);. r|eturn rs|
|00000870| 72 63 49 64 3b 0d 7d 0d | 0d 73 68 6f 72 74 20 44 |rcId;.}.|.short D|
|00000880| 55 5f 43 65 6e 74 65 72 | 41 4c 52 54 28 73 68 6f |U_Center|ALRT(sho|
|00000890| 72 74 20 72 73 72 63 49 | 64 29 7b 0d 20 20 20 20 |rt rsrcI|d){. |
|000008a0| 72 65 74 75 72 6e 20 44 | 55 5f 43 65 6e 74 65 72 |return D|U_Center|
|000008b0| 28 27 41 4c 52 54 27 2c | 72 73 72 63 49 64 29 3b |('ALRT',|rsrcId);|
|000008c0| 0d 7d 0d 0d 73 68 6f 72 | 74 20 44 55 5f 43 65 6e |.}..shor|t DU_Cen|
|000008d0| 74 65 72 44 4c 4f 47 28 | 73 68 6f 72 74 20 72 73 |terDLOG(|short rs|
|000008e0| 72 63 49 64 29 7b 0d 20 | 20 20 20 72 65 74 75 72 |rcId){. | retur|
|000008f0| 6e 20 44 55 5f 43 65 6e | 74 65 72 28 27 44 4c 4f |n DU_Cen|ter('DLO|
|00000900| 47 27 2c 72 73 72 63 49 | 64 29 3b 0d 7d 0d 00 00 |G',rsrcI|d);.}...|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000990| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|000009a0| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|000009b0| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a80| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000a90| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+